# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

inherit webapp eutils

DESCRIPTION="(web)shell for/in php."
HOMEPAGE="http://www.gimpster.com/php-shell/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
IUSE="$IUSE"
LICENSE="GPL-2"
KEYWORDS="~x86 ~amd64"
DEPEND="virtual/php"

src_compile() {
	einfo "Nothing to compile."
}

src_install() {

	local docs="AUTHORS LICENSE README INSTALL Changelog"
	
	webapp_src_preinst
	
	cd ${WORKDIR}/${P}
	dodoc ${docs}
	for doc in ${docs}; do
		rm -f ${doc}
	done
	cp -R * ${D}${MY_HTDOCSDIR}
	for y in `find . -name '*.php' -print ` ; do
		webapp_runbycgibin php ${MY_HTDOCSDIR}/$y
	done
	for y in `find . -type f -print` ; do
		webapp_serverowned ${MY_HTDOCSDIR}/$y
	done

	webapp_src_install
}

